//
//  LTLforward.m
//  WeiBo
//
//  Created by Apple_Lzzy46 on 16/10/24.
//  Copyright © 2016年 LTL. All rights reserved.
//

#import "LTLforward.h"
#import "LTLPhone.h"
#import "LTLpictureView.h"

@interface LTLforward ()

///正文
@property(nonatomic , weak)UILabel *text;
///配图
@property(nonatomic , weak)LTLpictureView *pic_urls;

@end

@implementation LTLforward

static NSString *ID = @"pictureViewCell";
-(instancetype)initWithFrame:(CGRect)frame
{
    if ((self = [super initWithFrame:frame]) != nil ) {
//        self.backgroundColor = [UIColor colorWithDisplayP3Red:217/256.0 green:217/256.0 blue:217/256.0 alpha:0.8];
         self.backgroundColor = [UIColor colorWithRed:217/256.0 green:217/256.0 blue:217/256.0 alpha:0.8];
        [self layoutUI];
        
    }
    return self;
}
#pragma mark -布局添加 UI
//布局
-(void)layoutUI
{
    //正文
    UILabel *text = [[UILabel alloc]init];
    text.numberOfLines = 0;
    
    //配图
    LTLpictureView *pictureView = [[LTLpictureView alloc]init];
    
    [self addSubview:text];
    [self addSubview:pictureView];

    self.text = text;
    self.pic_urls = pictureView;

}
-(void)setFrameModel:(LTLframeModel *)frameModel
{
    _frameModel = frameModel;
    
    self.text.text = [NSString stringWithFormat:@"@%@: %@",frameModel.model.retweeted_status.user.name , frameModel.model.retweeted_status.text];
    

    self.pic_urls.phone = _frameModel.model.retweeted_status.pic_urls;
    self.text.frame = self.frameModel.forwardTextFrame;
    
    self.pic_urls.frame = self.frameModel.forwardPictureFrame;
}




@end
